import { ACCESS_TOKEN, USER_INFO } from '@/store/mutation-types'
import router from '../router'
import storage from 'store'
import message from 'ant-design-vue/es/message'




export function nav(path, login = false) {
  const token = storage.get(ACCESS_TOKEN)
  if (login == true) {
    if (token == undefined) {
      message.info('请先登录')
    } else {
      router.push(path)
    }
  } else {
    router.push(path)
  }

} 